package com.xmy.cultivate.service.impl;

import com.xmy.cultivate.entity.CisPosition;
import com.xmy.cultivate.entity.CisPositionDetail;
import com.xmy.cultivate.mapper.CisPositionMapper;
import com.xmy.cultivate.service.ICisPositionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 排班顺位表 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2024-08-16
 */
@Service
public class CisPositionServiceImpl extends ServiceImpl<CisPositionMapper, CisPosition> implements ICisPositionService {

    @Autowired
    private CisPositionMapper cisPositionMapper;

    @Override
    public long getIsSaveYesOrNo(CisPosition cisPosition, CisPositionDetail cisPositionDetail) {
        return cisPositionMapper.getIsSaveYesOrNo(cisPosition,cisPositionDetail);
    }

    @Override
    public long getIsEditYesOrNo(CisPosition cisPosition, CisPositionDetail cisPositionDetail) {
        return cisPositionMapper.getIsEditYesOrNo(cisPosition,cisPositionDetail);
    }

    @Override
    public List<CisPosition> getPositionList(Integer yearPart,
                                             Integer quarterNum,
                                             Long schoolId,
                                             Long subjectsId,
                                             Integer yearClassId,
                                             Long classTypeId,
                                             Long teacherId,
                                             Integer isFull,
                                             Integer limitNum){
        return cisPositionMapper.getPositionList(yearPart,quarterNum,schoolId,subjectsId,yearClassId,classTypeId,teacherId,isFull,limitNum);
    }

    @Override
    public List<Long> getPositionGradeIdList(Integer yearPart,
                                             Integer quarterNum,
                                             Long schoolId,
                                             Long subjectsId,
                                             Integer yearClassId,
                                             Long classTypeId,
                                             Long teacherId,
                                             Integer limitNum){
        return cisPositionMapper.getPositionGradeIdList(yearPart,quarterNum,schoolId,subjectsId,yearClassId,classTypeId,teacherId,limitNum);
    }

    @Override
    public List<CisPosition> getPositionDataList(Integer yearPart,
                                                 Integer quarterNum,
                                                 Long schoolId,
                                                 Long subjectsId,
                                                 Integer yearClassId,
                                                 Long classTypeId){
        return cisPositionMapper.getPositionDataList(yearPart,quarterNum,schoolId,subjectsId,yearClassId,classTypeId);
    }
}
